Computers and other machines are often equipped with sensors that allow the machine to detect various aspects of its environment. For example, a machine could be equipped with an accelerometer, Global Positioning System (GPS) receiver, light sensor, etc. These sensors allow the machine to detect motion, position, and ambient light, respectively.
A machine may provide some type of interface to the sensors so that software on the machine can read data from the sensors. For example, a computer's operating system may provide an application programming interface (API) that allows applications, and other programs, on the computer to read the sensor values. For example, a program could call an API function to obtain the current acceleration vector from the accelerometer, or the current latitude and longitude from the GPS receiver.
While a sensor interface, such as that described above, allows programs to read sensor values, for a program to use the sensor interface directly may complicate the design of the software. Programs typically have complex control flow loops that respond to various events. Including logic that reads the sensors and responds to sensor values complicates the control flow, and other aspects, of the program. Due to the complexity of using sensor data through a typical sensor interface, many programs do not make use of sensor data.